﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.ComponentModel;

namespace ThreeByte.ActiveDeck.Controls
{
    /// <summary>
    /// Interaction logic for WordBucket.xaml
    /// </summary>
    public partial class WordBucket : UserControl, INotifyPropertyChanged
    {
        public WordBucket() {
            InitializeComponent();
        }

        public event PropertyChangedEventHandler PropertyChanged;

        private void NotifyPropertyChanged(String info) {
            if (PropertyChanged != null) {
                PropertyChanged(this, new PropertyChangedEventArgs(info));
            }

        }
        #region Dependency Properties
        public static readonly DependencyProperty CategoryProperty = DependencyProperty.Register("Category",
            typeof(string), typeof(WordBucket), new PropertyMetadata(CategoryChanged));

        public string Category {
            get {
                return (string)GetValue(CategoryProperty);
            }
            set {
                SetValue(CategoryProperty, value);
                NotifyPropertyChanged("Category");
            }
        }

        private static void CategoryChanged(DependencyObject obj, DependencyPropertyChangedEventArgs e) {
            //TOOD: Reorganize/Resize
            //PictureController controller = (PictureController)obj;
            //controller.ResetDataContext();
        }
        #endregion



    }
}
